//
//  JCFlipPage.m
//  JCFlipPageView
//
//  Created by ThreegeneDev on 14-8-8.
//  Copyright (c) 2014年 JimpleChen. All rights reserved.
//

#import "JCFlipPage.h"

@implementation JCFlipPage

@synthesize reuseIdentifier = _reuseIdentifier;

- (void)dealloc
{
    
    [_reuseIdentifier release];
    [_publisher_icon_url release];
    [_publisher_name release];
    [_text release];
    [_image_urls release];
    [_good_count release];
    [_bad_count release];
    [_share_count release];
    [_zanImage release];
    [_caiImage release];
    [_shareImage release];
    
    [super dealloc];
    
}

- (void)prepareForReuse
{
    
}

- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithFrame:frame];
    
    if (self) {
        
        _reuseIdentifier = reuseIdentifier;
        
        self.publisher_icon_url = [[UIImageView alloc]initWithFrame:CGRectMake(5 * myWidth, 5 * myHeight, 30 * myWidth, 30 * myWidth)];
        _publisher_icon_url.layer.cornerRadius = 15 * myWidth;
        _publisher_icon_url.layer.masksToBounds = YES;
        [self addSubview:_publisher_icon_url];
        [_publisher_icon_url release];

        
        self.publisher_name = [[[UILabel alloc]initWithFrame:CGRectMake(10 * myWidth + self.publisher_icon_url.frame.size.width, 5 * myHeight, 150 * myWidth, 30 * myHeight)] autorelease];
        _publisher_name.font = [UIFont systemFontOfSize:13];
        [self addSubview:_publisher_name];
//        [_publisher_name release];
        
        
        self.text = [[UILabel alloc]initWithFrame:CGRectMake(5 * myWidth, self.publisher_name.frame.size.height +  2 * myHeight, self.frame.size.width - 120 * myWidth, 30 * myHeight)];
        _text.font = [UIFont systemFontOfSize:15 * myHeight];
        [self addSubview:_text];
        [_text release];
        
        
        self.image_urls = [[HomeImageVIew alloc] initWithFrame:CGRectMake(0, self.publisher_name.frame.size.height + self.text.frame.size.height + 2 * myWidth,self.frame.size.width , self.frame.size.height - 113 )];
        [self addSubview:_image_urls];
        _image_urls.userInteractionEnabled = YES;
        [_image_urls release];
        
        
        self.zanImage = [[UIImageView alloc]initWithFrame:CGRectMake(5 * myWidth, 4 * myHeight + self.frame.size.height - 49, 20 * myWidth, 20 * myHeight)];
        [self addSubview:_zanImage];
        [_zanImage release];
        
        
        self.good_count = [[UILabel alloc]initWithFrame:CGRectMake(15 * myWidth + self.zanImage.frame.size.width,  self.frame.size.height - 49 , 50 * myWidth, 30 * myHeight)];
        [self addSubview:_good_count];
        [_good_count release];
        
        
        self.bad_count = [[UILabel alloc] initWithFrame:CGRectMake(115 * myWidth, self.frame.size.height - 49, 60 * myWidth, 30 * myHeight)];
        [self addSubview:_bad_count];
        [_bad_count release];
        
        
        self.caiImage = [[UIImageView alloc]initWithFrame:CGRectMake(90 * myWidth, 5 * myHeight + self.frame.size.height - 49, 20 * myWidth, 20 * myHeight)];
        [self addSubview:_caiImage];
        [_caiImage release];
        
        
        self.share_count = [[UIButton alloc] initWithFrame:CGRectMake(340 * myWidth, self.frame.size.height - 49, 38 * myWidth, 30 * myHeight)];
        [self addSubview:_share_count];
        [_share_count release];
        
        
        self.shareImage = [[UIImageView alloc]initWithFrame:CGRectMake(320 * myWidth, 5 * myHeight + self.frame.size.height - 49 ,20 * myWidth, 20 * myHeight)];
        [self addSubview:_shareImage];
        [_shareImage release];
        
    }
    
    return self;
    
}

@end
